Skip to main content
Version: 2.x

Class OdinCustomEffectUnityComponentBase<U>

Custom base component for OdinNative.Wrapper.Media.CustomEffect

This convenient class provides effect template with a passthrough of custom userdata on a callback. The abstract representation of a base custom effect is to simplify implementation of OdinNative.Unity.Audio.IOdinEffect as a Unity component. (see other predefined custom effects)

Assembly: cs.temp.dll.dll
Declaration
public abstract class OdinCustomEffectUnityComponentBase<U> : MonoBehaviour, IOdinEffect where U : unmanaged

Derived:
OdinNative.Unity.Audio.OdinColliderFilterComponent, OdinNative.Unity.Audio.OdinECLoopbackComponent, OdinNative.Unity.Audio.OdinMuteAudioComponent, OdinNative.Unity.Audio.OdinTerrainFilterComponent, OdinNative.Unity.Audio.OdinVolumeBoostComponent, OdinNative.Unity.Audio.OdinVolumeComponent

Implements:
OdinNative.Unity.Audio.IOdinEffect

Properties

Media

Get Media

Declaration
public virtual IMedia Media { get; set; }

Effect

Get base effect

Declaration
public PiplineEffect Effect { get; }

IsCreated

Flag if the effect was added to the pipeline

Declaration
public bool IsCreated { get; }

IsEnabled

Flag if the component is active or use isActiveAndEnabled

Declaration
public bool IsEnabled { get; }

Fields

UnityQueue

Declaration
protected readonly ConcurrentQueue<UnityAction> UnityQueue

DestroyOnError

Declaration
public bool DestroyOnError

_warn

Declaration
protected bool _warn

_corrupt

Declaration
protected bool _corrupt

Methods

OnEnable()

Declaration
protected virtual void OnEnable()

Reset()

Declaration
protected virtual void Reset()

Start()

Declaration
protected virtual void Start()

Update()

Declaration
protected virtual void Update()

OnDisable()

Declaration
protected virtual void OnDisable()

GetEffectUserData()

Get userdata used for the

Declaration
public virtual U GetEffectUserData()
Returns

<U>: effect userdata### CustomEffectCallback(OdinArrayf, ref bool, U) Callback delegate for the effect

Declaration
public virtual void CustomEffectCallback(OdinArrayf audio, ref bool isSilent, U _)
Parameters
TypeNameDescription
Odin.OdinArrayfaudioaudio data wrapper for copy buffer to native
System.BooleanisSilent
<U>_

ResetEffect()

Removes an effect from the pipeline and add a new effect with callbacks

Declaration
public virtual void ResetEffect()

OnDestroy()

Declaration
protected virtual void OnDestroy()

GetMedia<T>()

Get Media

Declaration
public virtual T GetMedia<T>() where T : IMedia
Returns

<T>: Media##### Type Parameters

  • T

GetEffect()

Get custom effect

Declaration
public virtual PiplineEffect GetEffect()
Returns

Odin.PiplineEffect: custom effect

Implements